package com.securitytrace.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 
 * 条形码记录的具体信息 实体类
 *
 */
@Entity
@Table(name="bar_Code_recorded_info")
public class BarCodeRecordedInfo implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 6813842881069268605L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private long id;
	
	@ManyToOne
	@JoinColumn(name="barCode")
	private BarCode barCode;
	
	@ManyToOne
	@JoinColumn(name="addressId")
	private Address address;
	
	private Date recordedDate;
	

	public void setId(long id) {
		this.id = id;
	}
	public long getId() {
		return id;
	}

	public void setRecordedDate(Date recordedDate) {
		this.recordedDate = recordedDate;
	}
	public Date getRecordedDate() {
		return recordedDate;
	}
	public void setBarCode(BarCode barCode) {
		this.barCode = barCode;
	}
	public BarCode getBarCode() {
		return barCode;
	}
	public void setAddress(Address address) {
		this.address = address;
	}
	public Address getAddress() {
		return address;
	}
	
}
